package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author lyl
 * 2021-10-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_detail")
public class DetailBean extends Model {

    private static final long serialVersionUID = 1L;

    /**
     * 订单明细id
     */
    @TableId(value = "detail_id", type = IdType.AUTO)
    private Integer detailId;

    /**
     * 商品名
     */
    @TableField("productName")
    private String productName;

    /**
     * 商品数量
     */
    @TableField("productNum")
    private String productNum;

    /**
     * 商品单价
     */
    @TableField("productPrice")
    private String productPrice;

    /**
     * 商品总价
     */
    @TableField(exist = false)
    private String productSumPrice;

    /**
     * 主订单外键
     */
    @TableField("fk_orderId")
    private String orderId;

    /**
     * 主订单实体
     */

    @TableField(exist = false)
    private OrderBean order;
}
